﻿lastScrollY = 0;
function heartBeat() {
    var diffY;
    if (document.documentElement && document.documentElement.scrollTop)
        diffY = document.documentElement.scrollTop;
    else if (document.body)
        diffY = document.body.scrollTop
    else
    { /*Netscape stuff*/ }

    //alert(diffY);
    percent = .1 * (diffY - lastScrollY);
    if (percent > 0) percent = Math.ceil(percent);
    else percent = Math.floor(percent);

    document.getElementById("kefu14").style.top = parseInt(document.getElementById

("kefu14").style.top) + percent + "px";

    lastScrollY = lastScrollY + percent;
    //alert(lastScrollY);
}


var str ="<div id=\"kefu14\" style='font-size:13px;width:79px; height:170px; padding:108px 0 0 20px;position:absolute;top:100px;'>";
str += "<div style=\"position:absolute; top:85px;font-size:12px;padding-left:95px; width:40px;\" ><a href=\"javascript:void(0);\" onclick=\"document.getElementById('kefu14').style.display='none';\">关闭</a></div>";
str += "<a target=\"_blank\" href=\"http://chat8.live800.com/live800/chatClient/chatbox.jsp?jid=2481090829&companyID=65833&configID=64138&skillId=3369&enterurl=http%3A%2F%2Fpay%2Eemoney%2Ecn%2Fproduct%2Easpx&tm=1302605868173\">";
str += "<div style='font-size:13px; line-height:15px;width:79px; height:170px; padding:108px 0 0 40px; background:url(http://i.ymcps.com/images/float/images/kefu.jpg) 0 0 no-repeat;position:absolute;top:100px;'>";
str += "</div></a></div>";

suspendcode14 = str;
document.write(suspendcode14);
window.setInterval("heartBeat()", 1);